/*
ID:luongho3
TASK:shuttle
LANG:JAVA
 */

import java.io.File;
import java.io.PrintStream;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;


public class shuttle {

	int N;
	
	public static void main(String[] args) throws Exception {

		shuttle prob = new shuttle();
		
		prob.read();
		
		prob.solve();

	}
	
	void solve() throws Exception {
		config first = new config(N);
		first.setAsFirst();
		
		config last = new config(N);
		last.setAsLast();
		
		LinkedList<config> qu = new LinkedList<config>();
		qu.add(first);
		while (!qu.isEmpty()) {
			config front = qu.poll();
			config jr = front.jumpRight();
			if (jr != null) {
				if (jr.compareTo(last)==0) {
					last = jr;
					break;
				}
				qu.add(jr);
			}
			config fr = front.forwardRight();
			if (fr != null) {
				if (fr.compareTo(last)==0) {
					last = fr;
					break;
				}
				qu.add(fr);
			}
			config fl = front.forwardLeft();
			if (fl != null) {
				if (fl.compareTo(last)==0) {
					last = fl;
					break;
				}
				qu.add(fl);
			}
			config jl = front.jumpLeft();
			if (jl != null) {
				if (jl.compareTo(last)==0) {
					last = jl;
					break;
				}
				qu.add(jl);
			}
		}
		
		Stack<Integer> stack = new Stack<Integer>();
		config temp = last;
		while (temp != first) {
			stack.add(temp.epos);
			temp = temp.parent;
		}
		
		PrintStream ps = new PrintStream(new File("shuttle.out"));
		System.setOut(ps);
		int counter = 0;
		while (!stack.isEmpty()) {
			System.out.print(stack.pop());
			counter++;
			if (counter == 20) {
				System.out.println();
				counter = 0;
			}
			else if (!stack.isEmpty()) {
				System.out.print(" ");
			}
			else {
				System.out.println();
			}
		}
		ps.close();
	}
	
	void read() throws Exception {
		Scanner scanner = new Scanner(new File("shuttle.in"));
		N = scanner.nextInt();
	}

}

class config implements Comparable<config> {
	int size;
	int[] holes;
	int epos;
	config parent;
	config(int size) {
		this.size = size;
		this.holes = new int[2*size+2];
		this.epos = -1;
		this.parent = null;
	}
	config(config conf) {
		this(conf.size);
		for (int i=1;i<=size*2+1;++i) {
			this.holes[i] = conf.holes[i];
		}
		this.epos = conf.epos;
	}
	
	void setAsFirst() {
		for (int i=1;i<=size*2+1;++i) {
			if (i<=size) {
				holes[i] = 1;
			}
			else if (i==size+1) {
				holes[i] = 0;
				epos = i;
			}
			else {
				holes[i] = 2;
			}
		}
	}
	
	void setAsLast() {
		for (int i=1;i<=size*2+1;++i) {
			if (i<=size) {
				holes[i] = 2;
			}
			else if (i==size+1) {
				holes[i] = 0;
				epos = i;
			}
			else {
				holes[i] = 1;
			}
		}
	}
	
	config forwardRight() {
		if (epos > 1) {
			if (holes[epos-1] == 1) {
				config result = new config(this);
				result.holes[epos] = 1;
				result.holes[epos-1] = 0;
				result.epos = epos-1;
				result.parent = this;
				return result;
			}
		}
		return null;
	}
	
	config forwardLeft() {
		if (epos < 2*size+1) {
			if (holes[epos+1] == 2) {
				config result = new config(this);
				result.holes[epos+1] = 0;
				result.holes[epos] = 2;
				result.epos = epos+1;
				result.parent = this;
				return result;
			}
		}
		return null;
	}
	
	config jumpRight() {
		if (epos > 2) {
			if (holes[epos-2] == 1) {
				if (holes[epos-1] == 2) {
					config result = new config(this);
					result.holes[epos] = 1;
					result.holes[epos-2] = 0;
					result.epos = epos-2;
					result.parent = this;
					return result;	
				}
			}
		}
		return null;
	}
	
	config jumpLeft() {
		if (epos < size*2) {
			if (holes[epos+2] == 2) {
				if (holes[epos+1] == 1) {
					config result = new config(this);
					result.holes[epos] = 2;
					result.holes[epos+2] = 0;
					result.epos = epos+2;
					result.parent = this;
					return result;	
				}
			}
		}
		return null;
	}

	@Override
	public int compareTo(config conf) {
		if (this.size == conf.size) {
			for (int i=1;i<=this.size*2+1;++i) {
				if (this.holes[i] != conf.holes[i]) {
					return this.holes[i] - conf.holes[i];
				}
			}
			return 0;
		}
		else return this.size - conf.size;
	}
	
}
